import java.net.*;

public class InetAddressTest {
    static public void main(String [] args) throws Exception {

        System.out.println(InetAddress.getLocalHost());

        for (InetAddress i : InetAddress.getAllByName("www.baidu.com")) {
            System.out.println(i.getHostAddress());
        }

    }
}
